Skip to content

Add functions in transform plugin to cover modify plugin - #1003

Merged
timggggggg merged 9 commits into
masterfrom
1000-transform-cover-modify-plugin
Sep 24, 2026
Merged

timggggggg merged 9 commits into
masterfrom
1000-transform-cover-modify-plugin

Conversation

@timggggggg

@timggggggg timggggggg commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Functions

Six new functions and one new option on parse_regex:

function signature
parse_regex_all parse_regex_all(value, pattern, group: 0, limit: -1) — every match as an array
join join(value, separator) — array of strings into one string
trim trim(value, cutset) — strip characters from both ends
trim_left trim_left(value, cutset) — strip from the start
trim_right trim_right(value, cutset) — strip from the end
slice slice(value, start, end: null) — substring by character, negative offsets
parse_regex new numeric_groups: false — also key groups by index: "0", "1", …

New files

  • plugin/action/transform/stdlib/parse_regex_all.go + parse_regex_all_test.go
  • plugin/action/transform/stdlib/join.go + join_test.go
  • plugin/action/transform/stdlib/trim.go + trim_test.go
  • plugin/action/transform/stdlib/slice.go + slice_test.go

Modified files

  • plugin/action/transform/stdlib/parse_regex.go — numeric_groups option
  • plugin/action/transform/stdlib/registry.go — six registrations
  • plugin/action/transform/stdlib/parse_regex_test.go — numeric_groups tests
  • plugin/action/transform/stdlib/resolve_test.go — callFn helper, binds arguments
    through the compiled signature so named defaults apply
  • plugin/action/transform/transform.go — docs for the new functions
  • plugin/action/transform/README.md — regenerated
  • plugin/action/transform/doc_examples_test.go — compile-checks the new doc snippets

Fixes #1000

@timggggggg
timggggggg merged commit c2c6610 into master Sep 24, 2026
15 of 16 checks passed
@timggggggg
timggggggg deleted the 1000-transform-cover-modify-plugin branch September 24, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: transform plugin — cover the functionality of the modify plugin

3 participants